<?php
include("collect/Common/yzs1013_pldr.php");
if ($_POST['B1']) {
    $data = curl_file_get_contents($_POST['url'], $_POST['cookie'], $_POST['referer'], 1, "");
    $result = print_r(json_decode($data), 1);
    $result=(!$result)?$data:$result;
    if($_POST[gb]){
        $result=iconv("GB2312","UTF-8//IGNORE",$result);
    }
    $result=unicode_decode0(urldecode($result));
}

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=7"/>
    <title>JSON结果</title>
</head>
<style>
    textarea {
        width: 100%;
        height: 700px;
        line-height:15px;
        font-size:13px;
    }

    input[type^="text"] {
        width: 100%
    }
</style>
<body>

<form method="POST" action="">
    <div id="sss">
        <div class="info">网址:</div>
        <div class="inp"><input type="text" name="url" value="<?= $_POST['url'] ?>" onmouseover="this.select()"  onmouseout="this.blur()">
            <input type="submit" name="B1" value="发送">
            <input type="checkbox" name="gb" value="1" <?= $_POST['gb']?"checked":""; ?>>GB2312
            <a href="/collect/readytempnr.php">POST测试</a>
        </div>
        <div class="info">cookie:</div>
        <div class="inp"><input type="text" name="cookie" value="<?= $_POST['cookie'] ?>">
            <div class="info">referer:</div>
            <div class="inp"><input type="text" name="referer" value="<?= $_POST['referer'] ?>">
                <div class="info">返回:</div>
                <div class="inp"><textarea type="text" name="result"><?= $result ?></textarea></div>
            </div>
</form>

</body>
